package cz.mendelu.swi2.controllers;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.context.ContextLoaderListener;

import cz.mendelu.swi2.documents.Pozdrav;


@Controller
public class HelloWorldController {
	
	@Autowired
	private Pozdrav pozdrav;
	
	   @RequestMapping("/hello")
	   public ModelAndView helloWord(){
		      String message = pozdrav.rekniPozdrav();
		      return new ModelAndView("helloworld", "message",message);
	   }
  }
